package com.lin.controller;

import com.lin.entity.Account;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/accounts")
public class AccountController {
    @GetMapping("/show")
    public String show() {
        System.out.println("show");
        return "like you, like me, like everything!";
    }

    @GetMapping(value = "/show2", produces = "application/json")
    public Account show2() {
        System.out.println("show2");
        return new Account(1, "lin", 100);
    }
}
